﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace GTA.ExceptionHandling
{
    public abstract class BaseException : Exception
    {
        #region Properties
        protected String ErrorMessage;
        protected Int32 ErrorNumber { get; private set; }
        public override string Message
        {
            get
            {
                return this.ErrorMessage;
            }
        }
        public virtual String MessageFull
        {
            get
            {
                return this.GetFullException();
            }
        }
        #endregion

        #region Constructors
        public BaseException() { }
        public BaseException(Int32 ErrorNumber)
            : base()
        {
            this.ErrorNumber = ErrorNumber;
        }
        public BaseException(String ErrorMessage)
            : this(ErrorMessage, null)
        {
        }
        public BaseException(String ErrorMessage, Exception innerException)
            : base(ErrorMessage, innerException)
        {
            this.ErrorMessage = ErrorMessage;
        }
        #endregion

        #region Methods
        public String GetFullException()
        {
            return Common.Util.GetFullException(this);
        }
        #endregion
    }
}
